Major League Baseball (MLB) has pioneered the use of statistics and biometric data to inform both sport and business decisions. Popularized by the 2011 film Moneyball, a field of study called “sabermetrics” (after the Society for American Baseball Research), has developed around this data analysis.
The ability to track limited pitch data, such as location and speed, first became available in 2008 thanks to the installation of PITCHf/x systems in al 30 MLB stadiums. In 2015, Statcast systems were also installed that now enable nearly every ball and player movement to be tracked. For pitchers, advanced metrics such as ball spin rate and movement, as well as pitcher arm extension, angle, and release point are now available. On the batting side, batter swing plane and angle, and ball exit velocity, and launch angle are recorded. The sprint speed and acceleration, distance traveled, and route are tracked for all players simultaneously. And the trajectory of every ball in play is recorded.
The availability of this advanced data enables team-driven statistical analysis to inform in-game strategies, scouting, player development, injury prevention and rehabilitation, player acquisitions, contract negotiations, and team business strategies such as ticket and concession sales, partnerships, and marketing. Much of Statcast data is made publicly at Baseball Savant - leading to growth of amateur sabermetric communities such as Fangraphs Community Research.
I like baseball. And I like data. And I also have a data analysis assignment for BIOL 607 / 697. I could (and probably should) do an analysis on data that will contribute to my thesis. But my entire life revolves around those research projects. I’d rather have some fun with sabermetrics instead.
I’m particularly interested in how pitchers strategize against batters.
Image credit: DigitalOptics
Pitchers have an arsenal of different pitches that move in different directions and travel at different velocities. Different pitches are often used in sequences to disrupt a hitter’s timing and balance. Hopefully causing the hitter to either swing and miss for a strike or hit the ball weakly so that a fielder can make an easy play.
Image credit: DigitalOptics
Pitchers have quite the advantage in these match-ups. In fact, the rules have been modified in the past to create more balance and the MLB is currently experimenting with moving the pitcher’s mound farther back to give hitters more time to react to pitches. They’re also (secretly) testing different baseball compositions to influence how pitches move and how batted balls travel.
There’s a lot that goes into pitching strategy. But the most obvious component is deciding which pitch to use. Anecdotally, I’ve noticed that the slider pitch is being used much more frequently than in the past. I have no evidence to back this up. But I know how I can find out if this is true (hint: it’s with R Studio).
I’d like to start by analyzing pitch usage over time. Because baseball strategy is driven so heavily by analytics, any change in pitch usage is likely to be an intentional decision based on data that suggests that certain pitches correlate to positive or negative outcomes for the pitcher. After identifying changes in pitch usage, I’d like to try to identify why these changes have occurred by comparing pitch outcomes across different pitch types.
Following this, I plan to fit a linear model to determine how pitch factors contribute to positive pitch outcomes. The exact pitch outcomes are TBD - this depends on what my initial analyses reveal. It’s likely that I’ll use exit velocity as a proxy likelihood that fielders will convert the batted ball into an out. I might also use the percentage of hitter swings that result in a miss (i.e., whiffs). The predictor variables are also TBD and will be dependent on initial analyses. But I expect pitch velocity and movement to be key influencers of pitch outcome.
I hypothesize that usage of the slider has increased. I also hypothesize that usage of the slider leads to a higher likelihood of positive pitcher outcomes than other pitches. Lastly, I hypothesize that the two strongest predictors of positive pitch outcomes for sliders will be pitch velocity and vertical movement.
All data used in the analyses of this report are obtained from Baseball Savant’s Statcast Search. Here, I filtered and downloaded all available pitch usage and outcome data by year, for each pitch. Since I am curious about pitch usage patterns on the largest scale, I considered all pitcher and batter handedness-es (i.e., righties and lefties for both) together. Only pitchers that at least 100 total pitches in a year were considered to minimize influence of small sample sizes stemming from minor-league call-ups and position-player pitches.
Sweet. Now I need to do a couple of things. I need to first take all this data and calculate means for each that are weighted by pitch number (to avoid biasing analyses). Since more advanced metrics are only available post-Statcast implementation (~2015), I’ll need to do this two separate ways: first for the common metrics across all years and second across common and Statcast metrics across Statcast-era years.
Bleh. Ok, now the fun stuff. Next, I took the total number of times each pitch type was thrown and divided it by the total number of thrown pitches to calculate pitch usage percentages. I did this for each year that basic pitch tracking data is available (2008 onwards).
A few things jump out. Usage of the fastball has varied a bit, relative to other pitches, over time. But its usage has decreased overall. Usage of the sinker has decreased substantially. Usage of the change up and curveball increased marginally, while usage of the slider has visibly increased within the Statcast era.
Usage of the slider has increased substantially. SUBSTANTIALLY. This validates my anecdotal observations that its usage has increased. I’m a genius. Interestingly, usage has primarily increased since around 2016. Any ideas what this timeline aligns with? Whoa, you’re right! This aligns very well with the availability of advanced pitch metrics compiled by the Statcast systems installed in 2015. Perhaps slider usage increased in response to the addition of Statcast data that either suggested its effectiveness or indicated ways to maximize its potential.
Quantification of these usage changes reveals that slider usage has increased by 43% since Statcast data became available. Usage of the cutter also increased substantially, but initial usage was low relative to the slider so raw pitch numbers are also relative low. Interesting, the slider and cutter both have similar speeds and movement trajectories, with the slider having greater movement. I wonder if the uptick in usage of both of these pitches is connected. But that’s an analysis for another day.
Now I need to figure out why usage of the slider has increased so much. Fortunately, all of the available pitch factor outcome data exists within the data I have already downloaded.
First, I plotted the percentage of pitches that hitters swung at and the rate at which those swings resulted in contact.
Sliders are one of the pitches that batters swing most often at, with hitters swinging at only change ups and cutters more often. However, hitters make contact less often on sliders than any other pitch. From a pitcher strategy position, the best outcome is for a hitter to whiff when they swing. Perhaps sliders provide a way to maximize whiffs, as hitters swing at them more often than most pitches and make contact less often than any other pitch.
While I am focusing on sliders moving forward, there are a lot of interesting follow-up analyses that can stem from these swing and contact rate results. I’m going to spit-ball a couple here before moving on with slider analyses.
Sinker contact rate is quite high relative to other pitches. In a vacuum, contact is a negative pitcher outcome because it creates an opportunity for the hitter to reach base and potentially score a run. So in that same vacuum, the sinker is likely not a good pitch because it leads to more opportunities for hitters to reach base. Unless the contact against sinkers sucks. The sinker has historically been used to induce groundballs, which can lead to easy players for infielders to produce outs or double plays. A future analysis could look at the association between sinkers and hitter launch angle, as well as the pitch factors that decrease launch angle to produce ground balls.
Change ups are also thrown often and result in low contact rates. An analysis similar to the one I have planned for the slider could be quite interesting for this pitch as well.
Furthermore, there has been a general downtrend in contact rate across all pitches with time. This aligns well with the narrative that baseball has shifted towards an offensive approach model of Three True Outcomes. I would be curious at seeing if contact rate is associated with swing plane and swing angle, as hitting philosophy has shifted more towards increasing launch angle in recent years.
OK. Back to the slider. So hitters are swing at sliders a lot and whiffing against them more often than any other pitch. But what happens when hitters do make contact? If that contact is good, resulting in more hits, the benefit of inducing whiffs might be lost.
Note: for these analyses, I’ve reduced that dataset down to Statcast-era data, as this contains the most advanced metrics.
When hitters do make contact, they produce a lower batting average (i.e., average number of hits per at bat, with a batting average of 0.500 indicating one hit per every two at bats) against sliders than all other pitches. The same goes for expected batting average, which considers the likelihood that a given contact will result in a hit based on the batted ball trajectory. When you look at batting average on balls in play (BABIP), which removes strikeouts from the equation, the only pitch that routinely outperforms the slider os the change up.
From BABIP and batting average, we can reverse calculate the strikeout rates for each pitch (because the only difference between BABIP and batting average is the strikeouts are not considered in BABIP).
From this, it is clear that hitters strikeout against sliders more than most other pitches, with only the curveball competing (and slightly outperforming some years).
What if the contact that hitters do make against sliders is really good? What if that contact leads to more extra-base hits, such as doubles, triples, and home runs, compared to other pitches?
Well, that’s not the case. Slugging percentage, which is a calculation of the average number of total bases per at bat (for example, one single in four at bats yields a slugging percentage of 0.250), is typically lower against sliders than any other pitch.
To corroborate this, we can see that exit velocity, or the velocity of the ball towards the field when the hitter makes contact, is lower against sliders than most pitches. Only the change up results in a lower exit velocity. (Hmm…that change up is looking more and more enticing for future analysis).
So from all of these outcome analyses, we can conclude the following:
Sliders are dominant.
What about the slider makes it so effective at inducing whiffs and weak contact? Publicly available metrics that we can consider are velocity, spin rate, release extension, different types of movement, and location in the zone. Because looking at both whiffs and weak contact would be a lot of work, let’s start by looking at whiffs.
To obtain location data from Baseball Savant’s Statcast Search, I filtered and downloaded available pitch usage and outcome data by zone per year, for each pitch. Zones encompassed 13 regions: the top left, top center, top right, middle left, middle center, middle right, bottom left, bottom center, and bottom right nonants inside of the strike zone; top left, top right, bottom left, and bottom right quadrants outside of the strike zone. Movement data was obtained through Baseball Savant’s Pitch Movement Leaderboard and was filtered by slider and downloaded by year. Again, all pitcher and batter handedness-es were grouped together and only pichers that threw at least 100 pitches in a year were included. The available movement data is not differentiated by pitch location, limiting the accuracy of interaction analyses between the two variables.
Let’s first look at the influence of slider velocity on whiff likelihood. The distance from the pitcher’s mound to home plate is 60.5 feet. A slider thrown 80 mph travels 117.3 feet per second (fps), while a slider thrown 90 mph travels 132 fps. So when a slider is thrown 80 mph, a hitter has 0.516 seconds to identify what pitch is being thrown, decide whether or not that pitch will be in the strike zone, determine whether to swing, and execute that swing. Conversely, a hitter has only 0.458 seconds when a slider is thrown 90 mph.
An increase in velocity is generally associated with an increase in the percent of swings that result in a whiff (i.e., the whiff percentage). Except for the change up. This correlation is small-ish for the slider compared to other pitches like the fastball and curveball.
What about release extension? Release extension is defined as the distance the pitch is released from the pitcher’s mound, and may influence the hitter’s reaction window by shortening the distance that the pitch has to travel. For example, a release extension of 5 feet reduces the pitch travel distance from 60.5 feet to 55.5 feet. So, an 90 mph slider thrown with 0 feet of release extension travels to home plate in 0.458 seconds while an 80 mph slider thrown with 5 feet of release extension travels to home plate in 0.42 seconds.
Release extension is also positively correlated with whiff percentage across all pitches, though this is somewhat marginal for the slider. So it seems that factors that reduce the reaction window for hitters likely aren’t what’s driving the effectiveness of a slider.
Spin rate might influence the hitter’s ability to determine which pitch is being thrown. For example, faster spin rates may prevent the hitter from detecting the rotation of the spin rotation, which is indicative of how the pitch will move. Preventing the hitter from appropriately predicting pitch movement may increase likelihood of whiffs.
Spin rate does correlate to increases in whiff percent for all pitches, and the correlation appears to be greater here for sliders than that with velocity or release extension.
Next we can look at pitch movement. Publicly available pitch movement data includes horizontal movement (left to right or right to left), vertical movement due downward, rising movement, and tailing movement (movement opposite to horizontal movement, usually small in scale). Sliders typically rise, then move both horizontally and vertically with minimal tail. Let’s see how those influence whiff outcomes.
Horizontal movement is positively correlated to whiff percentage for sliders, though this correlation is marginal. This is also the case for change ups, curveballs, and fastballs. Horizontal movement exhibits a large positive correlation with whiff likelihood for cutters and a negative correlation for sinkers.
Vertical break is more positively correlated with slider whiff likelihood than horizontal break. It is also positively correlationed with whiff likelihood for change ups and cutters, while being negatively correlated for curveballs, fastballs, and sinkers.
An increase in rise has a clear positive correlation with whiff likelihood. It is also positively correlated with whiff likelihood for change ups and fastballs, but is negatively correlated for curveballs, cutters, and sinkers.
Tailing movement is positively correlated with whiff likelihood for for sliders. It’s actually positively correlated with whiff likelihood for every pitch except the sinker.
The last variable we can consider is pitch location in the strike zone.
Throwing a slider in the middle of strike zone leads to fewer whiffs. No surprises here. Whiff likelihood is higher as you throw pitches either high or low in the zone. However, whiff likelihood is highest when you throw a pitch outside of the zone, particularly below the zone and to the right.
Let’s summarize everything we know about the slider so far.
All of the considered variables led to increased whiff likelihood against sliders. While I had anticipated that velocity and horizontal and vertical movement would be associated with the greatest increase in whiff likelihood, spin rate, rise and tail had the greatest influence.
Let’s construct a linear regression model using velocity, release extension, spin rate, movement, and location as predictors of whiff likelihood. Modeling these factors will help characterize the relationship and strength of the associations.
There’s quite a bit of variance in sample size (number of pitches per location in the strike zone) across players per year. Let’s filter out samples with fewer than 10 pitches per location to remove the influence of small sample sizes.
There are several factors to consider in constructing a model here. - Whiffs are a counting statistic, so a Poisson distribution parameter is needed for the model - The canonical link of the Poisson distribution is logarithmic - There is a mixture of predictor variable classes (e.g., ‘whiffs’ is an integer, movement statistics are numerics, and location is a ‘character), so a generalized linear model is needed - The sample size of swings against the slider varies substantially across players and strike zone locations. This can be scaled by applying the offset() function to the log(’swings’)
slider_whiff_glm <- glm(whiffs ~ velocity + spin_rate +
release_extension + horizontal_break + vertical_break
+ rise + tail + zone + offset(log(swings)),
family = poisson(link = "log"),
data = slider_move_location_stats_select)
The posterior predictive check looks great - the model-predicted data mirrors the observed data nearly identically. There are no indicators of concern how homogeneity of variance, influential observations, and normality of residuals. However, there are clear concerns with overdispersion or zero-inflation and with co-linearity. I’ll first alter my model to a quasipoisson distribution family, which treats overdispersion as a nuissance parameter.
slider_whiff_glm <- glm(whiffs ~ velocity + spin_rate +
release_extension + horizontal_break + vertical_break
+ rise + tail + zone + offset(log(swings)),
family = quasipoisson(link = "log"),
data = slider_move_location_stats_select)
Next I have to consider the possible co-linearity concerns. There is a moderate VIF for horizontal break and rise, as well as high VIF for velocity and vertical break. I am not SUPER concerned about this because the posterior predictive check is such a good match. It is worth looking at the correlation between predictors, though.
These results are interesting both in regard to the co-linearity concerns of my model and also in regards to baseball physics as a whole. Velocity has a strong negative correlation with a slider’s horizontal and vertical break. Intuitively, it makes sense that more movement would decrease velocity by increasing friction and resistance exposure. However, it can’t be determined from this whether increased velocity reduces movement or vice versa.
Spin rate is correlated with all movement types. This aligns with modern pitching development approaches that emphasize increasing spin rate to improve pitch movement. In fact, there was a recent MLB cheating scandal in which pitchers were caught using an illegal, sticky substance to increase grip and spin rate during games.
Lastly, all movement types are positively correlated with one another. This means that generally, increases in one type of movement are associated with increases in all type of movement. This may indicate that “movement” could be considered an overarching pitch factor comprised of individual metrics.
For the purpose of this linear model and analysis, I will not remove any of these co-linear variables. I will not look at interaction effects either, as this would result in 16 predictors in the model. Exporing interaction effects between velocity and horizontal and vertical breaks, spin rate and all movements, and all movements with each other will be an aim of follow-up analyses.
So what can we learn from this model?
## # R2 for Generalized Linear Regression
## Nagelkerke's R2: 0.970
The model explains 97% of the variance in the data. That’s excellent. So what does this model tell us about how these variables predict whiff likelihood?
Initial assessments of each predictor’s influence indicates that rise and tail decrease whiff likelihood for sliders, as does throwing the slider in any nonant of the middle of the zone. Every other predictor increases whiff likelihood.
Visualizing the influence of pitch location on whiff likelihood clearly exemplifies this. Throwing sliders in the middle of the zone result in the lowest whiff percentage relative to the mean. Throwing sliders in the top of the zone is slightly better, and throwing sliders low in the zone is even better. Pitches in the middle result in fewer fewer whiffs, while pitches in the right result in the most. Throwing pitches outside of the result leads to more whiffs than inside the zone, with pitches that are low and outside the zone resulting in the most whiffs. The best location to throw the slider in is low and outside the zone to the right side of the plate. These results are likely driven by the dominance of righty pitchers and righty hitters in this sample, meaning most sliders analyzed here move downward and away from righty batters.
The model predicts that increased velocity leads to an increase in whiffs on pitches inside the zone, regardless of location. This aligns pretty well with the